Method for dynamically adapting the encoding of an audio and/or video stream transmitted to a device

ABSTRACT

The present invention concerns a method for dynamically adapting the lossy encoding of an audio and/or video stream ( 112 ) transmitted by a first device ( 101 ) to a remote device ( 102 ), said method comprising the following steps: the remote device ( 102 ) receives and decodes said stream ( 112 ), called the incoming stream, and transmits an outgoing stream ( 111 ) having at least one indicator relating to a state of said remote device ( 102 ) that is modified by the execution of the decoding of the incoming stream ( 112 ); the first device ( 101 ) receives the outgoing stream ( 111 ), extracts said at least one indicator therefrom and adapts the encoding of the incoming stream ( 112 ) according to said at least one extracted indicator. The method can be applied notably to video conferences conducted on the basis of self-powered terminals for the purpose of maintaining the operating period of these terminals.

FIELD OF THE INVENTION

The present invention concerns a method for dynamically adapting theencoding of an audio and/or video stream transmitted to a device. Themethod can be implemented in apparatuses interchanging encoded audioand/or video streams in real time with the aim of adapting the encodingof a stream to variable constraints peculiar to the apparatus receivingthese streams. It can be applied notably to video conferences conductedon the basis of self-powered terminals for the purpose of maintainingthe operating period of these terminals.

BACKGROUND OF THE INVENTION

The rapid development in the capabilities of wireless communicationapparatuses means that it is now possible to carry out videocommunications in real time on the basis of mobile terminals with asatisfactory level of quality.

In order to maintain reasonable bitrate requirements for thetransmission of these streams on network infrastructures, these videostreams are generally compression encoded and therefore require decodingby the receiver of these streams. This decoding generally constitutes,among other elements, an operation that is demanding in terms ofcomputation resources and hence power consumption.

Techniques have been proposed to reduce the power consumption of aterminal that needs to perform stream decoding. Notably, the companySamsung Electronics Co. Ltd has proposed, during MPEG—Motion PictureExperts Group—standardization meetings in Geneva in April 2012 andStockholm in July 2012, a solution based on what is known as the DVFS“Dynamic Voltage Frequency Scaling” technique, a technique that isimplemented in numerous computation chips. DVFS involves reducing theclock frequency of the chip by decreasing the voltage that is appliedthereto; the consumption of this chip is then reduced. Conventionally,this decrease in the voltage is triggered in response to the finding, inview of the recent images transmitted in the received stream, that thechip has a power margin for carrying out decoding of this stream andthat it is therefore possible to decrease its computation power withoutaffecting the correct execution of the decoding. Moreover, the companySamsung Electronics Co. Ltd proposes improving this method bytransmitting to the stream receiver one or more metadata providing anindication of the complexity of decoding of the stream, this indicationallowing the apparatus receiving the stream to better adjust the powerof the chip used for decoding this stream.

This technique can nevertheless prove inadequate in certain situations,so much so that communication can be suddenly interrupted because theapparatus performing the decoding has exhausted its power reserves.

SUMMARY OF THE INVENTION

An aim of the invention is notably optimum use of the resources of astream decoding apparatus. To this end, the subject matter of theinvention is a method for dynamically adapting the lossy encoding of anaudio and/or video stream transmitted by a first device to a remotedevice, said method being characterized in that it comprises thefollowing steps:

-   -   the remote device receives and decodes said audio and/or video        stream, called the incoming stream, and transmits an outgoing        stream from the remote device, said outgoing stream having at        least one indicator translating a level of power saving or power        saving rate desired by said remote device, said indicator        corresponding to a level of reduction or education rate in        decoding operations for the stream or in processor P processing        cycles    -   the first device receives the outgoing stream from the remote        device, extracts said at least one indicator therefrom and        adapts the encoding of the incoming stream into the remote        device according to said at least one extracted indicator.        The method according to the invention thus allows dynamic        adaptation of the characteristics of an encoded stream according        to the constraints associated with the remote apparatus that is        responsible for decoding this stream. Advantageously, the        incoming stream is transmitted in real time. It may be noted        that the state of the remote device that is modified by the        execution of the decoding of the incoming stream can likewise be        modified by the encoding of the outgoing stream, when the latter        is an encoded stream.

According to one implementation of the method according to theinvention, the remote device comprises dedicated power supply and energystorage means, and means for measuring the power consumed and forcalculating the level of power saving, the first device modifying theencoding characteristics of the incoming stream according to the valueof said at least one indicator so as to reduce the power consumed by theremote device for decoding said incoming stream. By way of example, thefirst device can reduce the complexity of the encoded incoming stream,so that the remote device has a power margin for decoding this stream.The computation means on this remote device, for example amicroprocessor, can then be the subject of a reduction of the clockfrequency, a decrease in the voltage that is applied thereto, thusallowing a reduction in the consumption of the remote device.

According to a variant, in order to translate the desired level of powersaving into a level of reduction in the number of operations/cycles persecond, the method uses the relationship of operating frequency ornumber of operations/cycles per second as a function of power supplyvoltage and the relationship of power consumption as a function of thepower supply voltage of the device.

The remote device can insert into the outgoing stream one or moremetadata comprising at least one of said indicators, the first deviceextracting said indicator from said metadata before carrying out theadapted encoding of the incoming stream.

According to one implementation of the method for dynamically adaptingaccording to the invention, the remote device inserts into the outgoingstream metadata comprising at least one indicator from among: the levelof charge of said energy storage means, the change in said level ofcharge over time, and the swiftness of said change over time, the firstdevice modifying the encoding characteristics of the incoming streamaccording to the value of at least one of said indicators so as toreduce the power consumed by the remote device for decoding saidincoming stream. By way of example, if the remote device comprises anelectrical storage battery, it can modify the encoding of the streamaccording to the level of charge of this storage battery. The method canlikewise be applied to a remote device powered by other means, such assolar panels or any other means that is capable of no longer meeting theenergy needs of the device for reasons linked to the environment of thedevice. By way of example, if the second device comprises photovoltaicpanels, the remote device can modify the encoding of the incoming streamas a function of the level of luminosity to which said panels areexposed.

According to one implementation of the method for dynamically adaptingaccording to the invention, the outgoing stream is a video streamencoded on the basis of the “MPEG4-Advanced Video Coding” standard or astandard with upward compatibility with this standard, the remote deviceinserting said at least one indicator into a message of “SupplementalEnhancement Information” type associated with a plurality of the imagesof the outgoing stream.

According to one implementation of the method for dynamically adaptingaccording to the invention, the remote device applies different encodingparameters for the outgoing stream according to the state of the remotedevice, the first device determining the indicator(s) for adaptation ofthe encoding of the incoming stream on the basis of the encodingcharacteristics of the outgoing stream. This implementation of themethod according to the invention bears witness to the possibly implicitnature of an indicator: the latter is not explicitly transmitted bymetadata, but rather by encoding characteristics. It is actuallypossible to see the modifications of the characteristics of the encodedstream as a communication channel. By way of example, if the remotedevice is equipped with a module for adapting the complexity of encodingof the stream according to its own battery level, it decreases thecomplexity of encoding of the outgoing stream when the level of chargein the battery decreases below a predetermined threshold. This change ofcomplexity is perceived by the first device, which is then configured tointerpret this change as an indication to the first device to encode theincoming stream so as to minimize the decoding power used by the remotedevice. In other words, the change of complexity is considered by thefirst device to be an indicator aimed at alleviating the decodingresponsibility weighing on the remote device. By way of example, a lowerresolution of the outgoing stream can be interpreted by the first deviceto be a signal to produce an encoded incoming stream of lesserresolution than for the remote device.

The first device can likewise comprise dedicated power supply and energystorage means, the first device modifying the encoding characteristicsof the incoming stream according to, jointly, the value of said at leastone indicator and the level of charge of the energy storage means of thefirst device.

According to one implementation of the method for dynamically adaptingaccording to the invention, the encoding of the incoming stream by thefirst device comprises compression encoding comprising a step of cuttingthe images into blocks, and for each block, a transform and aquantification, the first device modifying, according to theindicator(s) of the outgoing stream, at least one parameter from amongthe fineness of cutting of the images into blocks, the relativeproportion of blocks with spatial predictive encoding in relation to thenumber of blocks with temporal predictive encoding, the level ofquantification.

The encoding of the incoming stream by the first device can comprisefiltration preprocessing and then compression encoding on thepreprocessed stream, the first device modifying, according to theindicator(s) of the outgoing stream, at least one parameter from amongthe intensity of said preprocessing filter, the level of compression ofthe encoding, the resolution of the incoming stream. Corrective actionon the encoding of the incoming stream can thus be taken on a pluralityof levels.

The subject matter of the invention is likewise an encoding device foraudio and/or video streams, said device being configured to implementthe steps of the method for dynamically adapting as described above thatare executed by the first device. By way of example, the encoding deviceis a mobile communication terminal provided with encoding and decodingmeans that make it capable, by way of example, of video conferencing.

The subject matter of the invention is likewise a decoding device foraudio and/or video streams, said device being configured to implementthe steps of the method for dynamically adapting as described above thatare executed by the remote device.

The subject matter of the invention is likewise an encoding and decodingdevice for audio and/or video streams, the device being capable ofalternately implementing the steps executed by the first device in themethod for dynamically adapting as described above and the stepsexecuted by the remote device in the same method.

The subject matter of the invention is likewise a system forcommunication by audio and/or video streams comprising an encodingdevice as described above with a decoding device as described above, theencoding device dynamically adapting the encoding of the streamtransmitted to the decoding device according to a state of the decodingdevice.

The system for communication according to the invention, in which thefirst device and the remote device are each an encoding and decodingdevice as described above, these devices being capable of interchangingstreams whose encoding performed locally on each of the two devices isdynamically adapted according to the constraints associated with theother device.

BRIEF DESCRIPTION OF THE DRAWINGS

Other features will emerge upon reading the detailed description, whichis provided by way of example and nonlimiting, that follows withreference to the appended drawings, in which:

FIG. 1 shows a schematic illustration of a system implementing a methodexample according to the invention;

FIG. 2 shows an overview illustrating the steps of a method exampleaccording to the invention;

FIG. 3 shows an overview illustrating a method for determining theactions to be performed on an encoded stream in order to decrease itscomplexity of decoding.

MORE DETAILED DESCRIPTION

FIG. 1 shows an illustrative diagram of a system implementing a methodexample according to the invention.

The system 100 comprises a first device 101 and a second device 102 thatare adapted to interchanging video streams 111, 112. By way of example,these devices 101, 102 are mobile terminals used for video conferencecommunication. Each of the devices thus comprises forming means (imagesensor) and video encoding and decoding means in order to transmit dataof small size over the network infrastructure 150 (for example acellular communication network) that separates them. The encoder 121 ofthe first device 101 produces an encoded video stream 112 that istransmitted to the decoder 132 of the second device 102. Moreover, inthe example, the encoder 131 of the second device 102 produces anencoded video stream 111 that is transmitted to the decoder 122 of thefirst device 101. The encoded video stream 111 is also transmitted to anextraction module 123 for an indicator 312 translating a level of powersaving. The extraction module may be part of the decoder 122.

These terminals 101, 102 being mobile, they are autonomous from thepoint of view of power; in the example, they each have a rechargeableelectrical battery (not shown in the figure). Moreover, the seconddevice 102 advantageously comprises a gage to determine the level ofcharge in its battery. According to one implementation of the methodaccording to the invention, the second device 102 transmits this levelof charge in the encoded stream 111 that it produces, called the firststream 111.

According to a first embodiment, the first device 101 receives thisfirst stream 111, decodes it and extracts therefrom the informationabout the level of charge in the battery of the second device 102. Thefirst device 101 then uses this information to check thecharacteristics, the parameters of the encoding of the second stream112, the one that is produced by the encoder 121 of the first device101. The reason is that if the second device 102 indicates to the firstdevice 101 that its battery level is low, it is desirable to provide thesecond device 102 with a second stream 112 that can be decoded withoutrequiring the consumption of a large amount of power, the remainingoperating period being linked to the level of charge. The complexity ofthe encoding of the second stream 112 can therefore be adjusted bytaking account of state parameters peculiar to the remote device 102,such as its battery level.

By virtue of the method according to the invention, the first device 101produces a second encoded stream 112 that is better adapted to theconstraints to which the device 102 is subjected, that is to say adaptedto the level of charge in its battery in the example. When it receives asecond stream 112 for which the decoding is simplified, the seconddevice 102 can, by way of example, decrease the voltage applied to itscomputation processor P that is responsible for decoding the stream 112,and can thus reduce the power consumption required in order to decodethe received stream 112. The second device 102 can thus extend itsoperating period. The method according to the invention forms a loopcomprising a phase of providing the encoding device with information, aphase of parameterized encoding using the transmitted information, andthen a phase of decoding; this loop can be repeated over time so as toprovide a function of dynamic adaptation to the state and/or to theenvironment of the decoding device.

Advantageously, metadata are likewise inserted into this second stream112 in order to provide the second device 102 with an indication of thelevel of complexity required for decoding this stream 112, so as tofacilitate the adjustment of the power of the computation chip assignedto decoding.

Symmetrically, the method according to the invention can likewise beimplemented in order to reduce the amount of power used to decode thefirst stream 111 received by the first device 101, so that the encoder131 of the second device 102 takes account of an indicator transmittedin the second stream 112 in order to adjust the encoding of the firststream 111 and thus to alleviate the computation responsibility linkedto decoding of this first stream 111 via the first device 101.

Each of the devices 101, 102 can thus indirectly control the dynamicadaptation of its computational load for decoding according to thebattery level that it has.

According to another embodiment, the device 101 is adapted to takingaccount of the level of power saving desired by the device 102 inrelation to its current consumption on the basis of the secondtransmitted stream 112. To this end, the device 102 is adapted, by wayof example, to translating the desired level of power saving (or powersaving rate) into a level of reduction in operations or in processorprocessing cycles by using, by way of example, the relationship ofoperating frequency of the processor or number of operations/cycles persecond as a function of the power supply voltage and the relationship ofpower consumption as a function of the power supply voltage, which isspecific to this device. The level of reduction in processor processingoperations or cycles being independent of the processor type, this meansthat the reduction in decoding operations that is estimated by theprocessor of the device 101, when it acts on the stream 112, will bevery valid for the processor of the device 102, even if it is of adifferent nature than the processor of the device 101. In order totranslate the level of saving, the method will notably use the chart forpower consumption as a function of the power supply voltage of theprocessor and the chart for power supply voltage as a function of theoperating frequency of the processor. There is a direct relationshipbetween the number of processing operations or cycles and the operatingfrequency of the processor. The device 101 will then modify the stream112 according to steps described further on in the description. In thisexample, it is the level of reduction in decoding operations for thestream 112 that constitutes the indicator 312 placed in the stream 111.

In this implementation variant, the device 101 comprises an extractionmodule for the request or metadatum that receives the stream 111 at theinput and that generates the indicator 312 at the output, translating arequest bound for an encoder in order to generate a stream that allowspower to be saved. In this example, the indicator 312 expresses areduction rate or level of reduction in decoding operations. The device101 can use the indicator directly and therefore no longer has to usecharts.

If the indicator is an energy saving rate, this is a case in which thedevice 101 uses charts to convert the request into a datum that can beused for its own sake.

FIG. 2 illustrates the steps of a method example according to theinvention. The method can be implemented on the system described abovewith reference to FIG. 1.

In a first step 201, the second device 102 transmits a first encodedstream 111 having at least one indicator relating to the state or to theenvironment of this second device 102. The transmitted indicators cancomprise the level of charge of energy storage means, such as a battery.Although the level of charge of a battery is transmitted in the exampleused, other indicators can be provided for the first device 101 so thatit checks the characteristics of the encoded stream 112 transmitted tothe second device 102. Equally, a plurality of indicators can be usedjointly. By way of example, an indicator concerning an evoluation in thecharge of the battery can be used so that if the battery is at a lowcharge level but this level rises again because the second device 102 isconnected to an external power source, the first device 101 can takeaccount of this so as not to excessively lower the quality of the secondstream 112 that is produced. In some special situations, the indicatorscan likewise relate to the environment in which the second device 102 issituated, for example climatic data such as the temperature or any otherelement that can possibly affect the operation of the device 102, andmore particularly its power consumption.

In the second example that is used, the transmitted indicator combinesthe previous parameters and the preferences of the user in terms oflength of service in order to derive therefrom a level of power saving,or even a level of reduction in decoding operations that is directlyusable by the device 101. Moreover, an indicator can directly representan encoding parameter or a predefined encoding mode to be applied by thefirst device 101 for encoding the second stream 112.

The indicator or the indicators can be transmitted by metadata that areinserted in the first stream 111. By way of example, in the case ofencoding of a video stream of MPEG4-AVC “Motion Picture Experts Group4—Advanced Video Codec” type, the indicator can be inserted into an SEI“Supplemental Enhancement Information” message, to each image in thestream 111 or according to a cycle with a longer period.

The indicators can likewise be transmitted by other means. Notably, theencoding characteristics of the first stream 111 themselves canconstitute an indicator. By way of example, if the resolution of theencoded stream 111 has decreased, the first device 101 can interpretthis change of resolution as a need for power saving on the part of thesecond device 102. This is because the level of charge in the battery ofthe second device 102 may be low, so that its encoder 131 is commandedto decrease the complexity of encoding for the first stream 111 that itproduces. This decrease in complexity can be interpreted by the firstdevice 101 as an indicator that needs to be used in order to itselfmodify the parameters of its encoder 121.

The indicators can be transmitted in a signal that is independent of thefirst stream 111. According to another implementation of the method fordynamically adapting according to the invention, the first stream 111does not exist and is replaced by a simple information signal bound forthe first device 101, said signal having the indicator(s) allowing thefirst device 101 to adapt its encoding.

In a second step 202, the first device 101 receives and decodes thefirst stream 111, extracts therefrom the indicator(s) present in thestream 111, and encodes and produces the second stream 112, the encodingof which is adjusted according to the extracted indicator(s). When anindicator is present in the form of metadata, for example a message ofSEI type that is present in an MPEG4-AVC stream, the second device 102extracts/reads this indicator from the SEI message. The first device 102can likewise be configured to extract implicit indicators, in otherwords indicators that are present in the form of encodingcharacteristics of the first stream 111. By way of example, theresolution of the first stream 111 can be considered to be an indicator.When all the indicators have been identified, the first device 101determines the encoding parameters, and encodes and transmits the secondstream 112. Multiple actions, which are set out further on withreference to FIG. 2, can be taken in order to adapt the encoding of thesecond stream 112 to the constraints of the decoding device 102.

In a third step 203, the second device 102 receives and decodes thesecond stream 112. By virtue of the parameterization adaptations madeduring the encoding of the second stream 112 via the first device 101,the decoding of the second stream 112 benefits from an adjustment to theconstraints that are linked to the state and/or to the environment ofthe second device 102. The decoding can be considered to be appropriateto the conditions in which the second device 102 are situated.

FIG. 3 illustrates a method for determining the actions to be performedon an encoded stream in order to decrease its complexity of decoding.This method can, by way of example, be implemented on the first device101 illustrated in FIG. 1.

The encoding 301 of the second stream 112 uses the indicators 312extracted from the first stream 111 in order to encode a source stream310 from, by way of example, an image sensor that is present on thefirst device 101. By way of example, the encoding 301 comprisespreprocessing 303 and then compression encoding 305. Theparameterization of these two steps 303, 305 is checked by a decisionmodule 307 taking account of the indicators 312.

By way of example, the compression encoding 305 implements a blockencoding technique such as encoding in the MPEG4-AVC format. This typeof technique has notably a step of cutting the images to be encoded intoblocks, which blocks are subjected to a transform (often by DCT,discrete cosine transform), a quantification and then entropic encoding.Moreover, some blocks have spatial predictive encoding (often calledintra blocks), and others have temporal predictive encoding (interblocks). Several characteristics of this encoding are parameterizable,notably the quantification or the cutting into blocks, in order toproduce an encoded stream that is simpler to decode.

The preprocessing 303 receives a source stream 310 at the input and canexecute filtering on the source stream 310 in order to decrease itsentropy, for example, and thus to facilitate the compression encoding305. This can involve a low pass frequency filter, for example. Thepreprocessing 303 can likewise modify the resolution of the images ofthe source stream 310, a video of lesser resolution requiring lesscomputation power in order to be decoded.

The decision module 307 acts on the parameters of the preprocessing 303and of the compression encoding 305 in order to vary the complexity ofdecoding of the produced stream 112 according to, notably, theindicators 312 that are received. Thus, the decision module 307 cannotably parameterize the intensity of the filter(s) applied during thepreprocessing, can parameterize the resolution of the video, canparameterize the fineness of cutting of the images into blocks, canparameterize the relative proportion of intra blocks in relation to thenumber of inter blocks, can parameterize the level of quantificationapplied during the compression encoding, or any other parameterizationthat allows the constraints at which the indicators 312 are aimed to bemet.

The order in which these parameter modifications are applied and theintensity with which they are applied may be the subject of variousstrategies. By way of example, there may be a requirement to preserve apredetermined quality for the encoded stream, so that a compromisebetween the complexity of decoding and the quality of the stream needsto be found.

According to an implementation example for the method according to theinvention, when the encoding of a video stream needs to be adapted inorder to decrease its complexity of decoding, three adjustments are madegradually, according to the change in the indicators over time, forexample according to the decrease in the level of the battery of theremote device 102. Firstly, the intensity of the preprocessing filtersis increased; secondly, the compression encoding parameters aremodified—for example the level of quantification, the number of blocksis reduced or the encoding characteristics of the blocks are modified—;thirdly, the resolution of the video is decreased. Thus, when the levelof the battery decreases but remains above a predetermined threshold,only the first action relating to the preprocessing operations will beperformed. These gradual adjustments allow a compromise to be reachedbetween the power saving obtained when decoding the second stream 112and the perceived quality of this stream. The reason is that, by way ofillustration, it may be desirable to increase the levels ofquantification for the stream (performed secondly in the example), butup to an acceptable degradation limit for the perceived quality. Beyondthat, the resolution of the video is reduced, as envisaged thirdly.

The parameterization decisions taken by the decision module 307 maylikewise be dependent on data other than the indicators 312. By way ofexample, if the supply of power to the first device 101 is dependent ona battery as well, the level of charge in this battery can play a partin the adaptation choices to be applied to the encoding of the secondstream 112. On this assumption, it is actually necessary to take accountof the level of charge in the local battery (of the first device 101) inorder to limit power consumption for encoding the second stream 112, andit is likewise necessary to take account of the level of charge in theremote battery (of the second device 102) in order to limit the powerconsumption owing to the decoding of this stream 112.

Moreover, among the indicators 312 that are transmitted with the firststream 111, there may feature a user parameter or a parameter linked tothe communication service that is being executed. By way of example, theuser of the second device 102 can configure a power management policythat influences the adaptation strategy for the coding of the secondstream 112. By way of illustration, if the user knows that the serviceassociated with reception of the stream will be of short duration, thereis no use in drastically reducing the quality of the stream 112.According to another implementation of the method according to theinvention, this power management policy can be defined, not by anindicator 312 that is transmitted in the first stream 111, but rather bymeans of a message that is transmitted when the communication is set upbetween the two devices 101, 102.

According to another implementation of the invention, no preprocessingis performed and the source stream 310 is directly processed bycompression encoding 305. Moreover, although block encoding of MPEG typeis chosen as an illustration, any type of parameterizable compressionencoding can be used.

According to one implementation of the invention, the decision module307 is not present in the encoder 121 of the device that produces theencoder stream, because the indicators 312 are encoding parameters thatcan be interpreted directly by the preprocessing 303 and/or thecompression encoding 305. By way of example, an indicator may be a levelof quantification to be applied during MPEG encoding. By way of example,this level has been determined previously by the second device 102 thathas transmitted the first stream 111.

According to one implementation of the method according to theinvention, when the decision module 307 decides to decrease theresolution of the stream, this resolution is decreased directly at thesource of the stream, that is to say that the source stream 310 is oflow resolution. By way of example, if the first device 101 has a videocamera whose output resolution can be configured, then the decisionmodule 307 transmits a command to this camera so that it produces astream of lesser resolution. This change constitutes a drastic reductionin the complexity of the stream without requiring any specialintervention on the parameterization of the level of the preprocessing303 or of the compression encoding 305.

The method according to the invention can be implemented in the form ofcomputer programs that are executed by a microprocessor that is presenton the first device 101 and on the second device 102, for example.According to another implementation, the functions of the methodaccording to the invention are implemented in the form of circuits, forexample programmable circuits of FPGA (Field Programmable Gate Array)type or specific circuits.

The method for dynamically adapting according to the invention can beapplied notably to video conferences for which at least one of theparticipants is connected via a mobile terminal provided with powersupply means that are independent and therefore limited. The method canthen be implemented in order to dynamically adapt the complexity of thestream encoded by a local terminal according to the environment or thestate of charge of the battery of the remote mobile terminal.

The method for dynamically adapting according to the invention can beapplied to multiple types of standard definition (SD) or high definition(HD) video streams and to multiple formats such as streams in theMPEG4-AVC (Moving Picture Experts Group 4-Advanced Video Coding, alsodenoted by H.264), MPEG2 (H.262), HEVC (High Efficiency Video Coding,sometimes denoted by H.265), VP8 (from the company Google Inc.) and DivXHD+ format, or a format having upward compatibility with one of theseformats. Upward compatibility with MPEG4-AVC is understood to mean aformat for which an encoder of a stream in this format is likewisecapable of encoding a stream in the MPEG4-AVC format and/or for which adecoder of a stream in this format is likewise capable of decoding avideo in the MPEG4-AVC format. The method for dynamically adaptingaccording to the invention can likewise be applied to other types ofstreams such as audio streams, or more generally to a stream with lossyencoding.

The invention claimed is:
 1. A method for dynamically adapting the lossyencoding of an audio and/or video stream transmitted by a first deviceto a remote device, comprising: the remote device (1) receiving, fromsaid first device, said audio and/or video stream, called the incomingstream, (2) decoding the incoming stream received from the first device,and (3) transmitting an outgoing stream from the remote device to thefirst device, wherein said outgoing stream comprises at least oneindicator translating a power saving rate desired by said remote device,said at least one indicator corresponding to a reduction rate indecoding operations for the incoming stream into the remote device or inprocessor P processing cycles; and the first device (1) receiving theoutgoing stream from the remote device, (2) extracting said at least oneindicator from the outgoing stream, and (3) adapting the encoding of theincoming stream, prior to transmission to the remote device, accordingto said at least one extracted indicator.
 2. The method for dynamicallyadapting the stream encoding of claim 1, wherein the remote devicecomprises (a) a dedicated power supply, (b) a device for storing energy,and (c) a device for measuring the power consumed and for calculatingthe necessary power saving rate, and wherein the first device modifiesthe encoding characteristics of the incoming stream according to a valueof said at least one indicator so as to reduce the power consumed by theremote device for decoding said incoming stream.
 3. The method fordynamically adapting the stream encoding of claim 1, further comprising:translating the desired power saving rate into a reduction inoperations/cycles per second, based, at least in part, upon therelationship of operating frequency or number of operations/cycles persecond as a function of the power supply voltage and the relationship ofpower consumption as a function of the power supply voltage of thedevice.
 4. The method for dynamically adapting the stream encoding ofclaim 1, wherein the remote device inserts into the outgoing stream oneor more units of metadata comprising at least one of said indicators,and wherein the first device extracts said indicators from said one ormore units of metadata before adapting the encoding of the incomingstream.
 5. The method for dynamically adapting the stream encoding ofclaim 3, wherein the remote device inserts into the outgoing streammetadata that comprises at least one indicator that indicates: the levelof charge of an energy storage, the change in said level of charge overtime, and the swiftness of said change over time, and wherein the firstdevice modifies the encoding characteristics of the incoming streamaccording to the value of at least one of said indicators so as toreduce the power consumed by the remote device for decoding saidincoming stream.
 6. The method for dynamically adapting the streamencoding of claim 4, wherein the outgoing stream is a video streamencoded on the basis of the “MPEG4-Advanced Video Coding” standard or astandard with upward compatibility with this standard, and wherein theremote device inserts said at least one indicator into a message of“Supplemental Enhancement Information” type associated with a pluralityof the images of the outgoing stream.
 7. The method for dynamicallyadapting the stream encoding of claim 1, wherein the remote deviceapplies different encoding parameters for the outgoing stream accordingto the state of the remote device, and wherein the first devicedetermines the indicator(s) for adaption of the encoding of the incomingstream on the basis of the encoding characteristics of the outgoingstream.
 8. The method for dynamically adapting the stream encoding ofclaim 1, wherein the first device comprises a dedicated power supply andan energy storage, and wherein the first device modifies the encodingcharacteristics of the incoming stream according to the value of said atleast one indicator and the level of charge of the energy storage of thefirst device.
 9. The method for dynamically adapting the stream encodingof claim 1, wherein the encoding of the incoming stream by the firstdevice comprises compression encoding by (a) cutting the images intoblocks, and (b) for each block, performing a transform and aquantification, and wherein the first device modifies, according to theindicator(s) of the outgoing stream, at least one parameters from amongthe fineness of cutting of the images into blocks, the relativeproportion of blocks with spatial predictive encoding in relation to thenumber of blocks with temporal predictive encoding, and the level ofquantification.
 10. The method for dynamically adapting the streamencoding of claim 1, wherein the encoding of the incoming stream by thefirst device comprises filtration preprocessing and then compressionencoding on the preprocessed stream, and wherein the first devicemodifies, according to the indicator(s) of the outgoing stream, at leastone parameter from among the intensity of said preprocessing filter, thelevel of compression of the encoding, and the resolution of the incomingstream.
 11. An encoding device for audio and/or video streams, whereinit is configured to implement the steps of the method as claimed in anyone of the preceding claims that are executed by the first device.
 12. Adecoding device for audio and/or video streams, wherein it is configuredto implement the steps of the method as claimed in claim 1 that areexecuted by the remote device.
 13. An encoding and decoding device foraudio and/or video streams, adapted of alternately implementing thesteps executed by the first device in the method as claimed in claim 1and the steps executed by the remote device in the same method.
 14. Asystem comprising the remote device and the first device of claim 1 forimplementing the method of claim
 1. 15. The system of claim 14, whereinthe first device and the remote device are respectively an encoding anddecoding device, and wherein the first device and the remote deviceexchange streams whose encoding is performed locally on each of thefirst device and the remote device according to the constraintsassociated with the other of the first device or the remote device. 16.The method for dynamically adapting the stream encoding of claim 5,wherein the outgoing stream is a video stream encoded on the basis ofthe “MPEG4-Advanced Video Coding” standard or a standard with upwardcompatibility with this standard, and wherein the remote device insertssaid at least one indicator into a message of “Supplemental EnhancementInformation” type associated with a plurality of the images of theoutgoing stream.